﻿CREATE TABLE [dbo].[Feadback] (
    [Id]                   INT             IDENTITY (1, 1) NOT NULL,
    [OpenId]               NVARCHAR (50)   NULL,
    [AppId]                NVARCHAR (50)   NULL,
    [FeedbackId]           NVARCHAR (50)   NULL,
    [TransId]              NVARCHAR (50)   NULL,
    [ConsumerAttitude]     NVARCHAR (50)   NULL,
    [ComplainReason]       NVARCHAR (500)  NULL,
    [ExpectSolution]       NVARCHAR (500)  NULL,
    [ConsumerExtInfo]      NVARCHAR (500)  NULL,
    [ComplainDate]         DATETIME        NULL,
    [MerchantSolution]     NVARCHAR (1000) NULL,
    [MerchantReason]       NVARCHAR (1000) NULL,
    [FeadbackDate]         DATETIME        NULL,
    [ConsumerRejectReason] NVARCHAR (1000) NULL,
    [ConsumerRejectDate]   DATETIME        NULL,
    [ConsumerConfirmDate]  DATETIME        NULL,
    [OperatorCode]         VARCHAR (50)    NULL,
    [Remark]               NVARCHAR (500)  NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付该笔订单的用户 ID，商户可通过公众号其他接口为付款用户服务。', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'OpenId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'字段名称：公众号 id；字段来源：商户注册具有支付权限的公众号成功后即可获得；传入方式：由商户直接传入。', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'AppId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'投诉单号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'FeedbackId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'交易订单号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'TransId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户态度：request  用户提交投诉  confirm  用户确认消除投诉  reject  用户拒绝消除投诉', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ConsumerAttitude';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户投诉原因', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ComplainReason';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户希望解决方案', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ExpectSolution';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户备注信息+电话', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ConsumerExtInfo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户投诉时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ComplainDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商户解决方案', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'MerchantSolution';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商户解释原因', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'MerchantReason';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商户解决时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'FeadbackDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户拒绝撤销投诉原因', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ConsumerRejectReason';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户拒绝撤销投诉的时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ConsumerRejectDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户确认撤销投诉的时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'ConsumerConfirmDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'操作员编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'OperatorCode';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'备注', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Feadback', @level2type = N'COLUMN', @level2name = N'Remark';

